package models;
 
import java.util.*;
import javax.persistence.*;
 
import play.db.jpa.*;
 
@Entity
public class ObjectLevel extends Model {
 
	public Date createdOn;
    public String name;
    public String description;
    public Date deletedOn;
    public Boolean isDefault;
    
    @ManyToOne
    public User createdBy;

    @ManyToOne
    public User deletedBy;

    @ManyToOne
    public Object object;
    
    @OneToMany(mappedBy = "objectLevel")
    public List<ObjectLevelItem> items;
    
    public ObjectLevel(Date createdOn, String name, String description) {
		this.createdOn = createdOn;
		this.name = name;
        this.description = description;
    }

    @Override
    public String toString() {
        return this.name;    //To change body of overridden methods use File | Settings | File Templates.
    }
}